import { type Ref, ref, computed } from "vue";
import type { PlusColumn, OptionsRow } from "plus-pro-components";
export function useSearch(pageEnums: Ref<{ [key: string]: OptionsRow[] }>) {
  const searchValues = ref({
    title: "",
    createdDate: ""
  });

  const searchColumns: PlusColumn[] = [
    {
      label: "标题",
      prop: "title"
    },
    {
      label: "创建时间",
      prop: "createdDate",
      valueType: "date-picker",
      fieldProps: {
        type: "datetimerange",
        startPlaceholder: "请选择",
        endPlaceholder: "请选择"
      }
    }
  ];
  return {
    searchValues,
    searchColumns
  };
}
